package com.rms.recruit_management_system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.rms.recruit_management_system.vo.TalentVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface TalentVoMapper extends BaseMapper<TalentVo> {

    @Select("select t.*,iv.candidate_name,iv.position_name,u.email,u.phone,ife.overall_evaluation from talent t left join interview iv on t.interview_id=iv.id " +
            "left join user u on t.user_id=u.user_id left join interview_feedback ife on t.feedback_id=ife.feedback_id")
    IPage<TalentVo> selectTalentPageWithJoins(Page<TalentVo> page);
}
